﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity;
namespace OrderManagement
{
    class OrderContext:DbContext
    {
        public OrderContext() : base("OrderDataBase") //链接字符串名称为OrderDataBase
        {
            Database.SetInitializer(
              new DropCreateDatabaseIfModelChanges<OrderContext>());
        }

        public DbSet<Order> Orders { get; set; }

        public DbSet<Customers> Customers { get; set; }

        public DbSet<OrderDetails> OrderDetails { get; set; }

        public DbSet<Goods> Goods { get; set; }
    }
}
